package org.example.videotran.repository;

import org.example.videotran.pojo.User;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface UserRepository extends CrudRepository<User,Integer> {
    Optional<User> findByPhoneAndPassword(String phone, String password);

    Optional<User> findByEmailAndPassword(String email, String password);

    Optional<User> findByPhone(String phone);

    Optional<Object> findByEmail(String phone);
}
